Pod::Spec.new do |s|
  s.name             = 'UGSDK'
  s.version          = '1.0.0'
  s.summary          = 'UGSDK 是一个用于游戏开发的工具包，提供支付、用户认证等功能。'

  s.homepage         = 'https://gitee.com/wangclwl/ugsdk-libs.git'
  s.license          = { :type => 'Proprietary', :text => 'Copyright 2018 AppsFlyer Ltd. All rights reserved.' }
  s.author           = { 'wangchuanliang' => 'wangchuanliang@gameale.com' }

  s.source = {
    :http => 'https://gitee.com/wangclwl/ugsdk-libs/releases/download/1.0.0/UGSDK.zip'
  }

  s.swift_version = '5.0'
  s.requires_arc = true
  s.ios.deployment_target = '13.0'

  s.subspec 'Core' do |ss|
    ss.vendored_frameworks = 'UGSDK/UGSDK.xcframework'
    ss.resources = ['UGSDK/UGSDK_Images.bundle']
  end

  s.subspec 'UG_Login_Google' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Login_Google.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'GoogleSignIn','~>6.2.4'
  end

  s.subspec 'UG_Login_Facebook' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Login_Facebook.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'FBSDKLoginKit','~>17.4.0'
  end

  s.subspec 'UG_Login_Kakao' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Login_Kakao.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'KakaoSDKUser'
  end

  s.subspec 'UG_Login_Naver' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Login_Naver.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'naveridlogin-sdk-ios','~>4.2.3'
  end

  s.subspec 'UG_Login_Line' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Login_Line.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'LineSDKSwift/ObjC'
  end

   s.subspec 'UG_Analytics_Adjust' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Analytics_Adjust.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'Adjust','~>5.1.1'
  end

  s.subspec 'UG_Analytics_AlibabaCloudRUM' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Analytics_AlibabaCloudRUM.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'AlibabaCloudRUM'
  end

  s.subspec 'UG_Analytics_Appsflyer' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Analytics_Appsflyer.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'AppsFlyerFramework','~>6.16.2'
  end

  s.subspec 'UG_Analytics_Facebook' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Analytics_Facebook.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'FBSDKCoreKit','~>17.4.0'
  end

   s.subspec 'UG_Firebase' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Firebase.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'FirebaseAnalytics','~>11.5.0'
    ss.dependency 'FirebaseCore','~>11.5.0'
    ss.dependency 'FirebaseMessaging','~>11.5.0'
    ss.dependency 'FirebaseCrashlytics','~>11.5.0'
    ss.dependency 'FirebaseAnalyticsOnDeviceConversion','~>11.5.0'
  end

  s.subspec 'UG_Share_Facebook' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Share_Facebook.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'FBSDKShareKit','~>17.4.0'
  end

  s.subspec 'UG_Ali_Log' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Ali_Log.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'AliyunLogNetworkDiagnosis', '~> 4.3.16'
  end

  s.subspec 'UG_Ali_NetworkDiagnosis' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Ali_NetworkDiagnosis.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'AliyunLogNetworkDiagnosis', '~> 4.3.16'
  end

  s.subspec 'UG_Ad_AdMob' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Ad_AdMob.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
    ss.dependency 'Google-Mobile-Ads-SDK','~>12.6.0'
  end

   s.subspec 'UG_Ad_Bridge' do |ss|
    ss.vendored_frameworks = [
      'UGSDK/UG_Ad_Bridge.xcframework',
    ]
    ss.dependency 'UGSDK/Core'
  end

  s.frameworks = 'UIKit','StoreKit','AppTrackingTransparency','AuthenticationServices','WebKit'

  # 修正后的工程配置
  s.pod_target_xcconfig = {
    'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES',
    'OTHER_LDFLAGS' => '-ObjC'
  }
end
